<?php 
$cs=Yii::app()->clientScript;
$cs->registerCssFile(Yii::app()->baseUrl.'/css/common.css');
?>
<h2>产品管理</h2>

<div class="actionBar" style="width:900px;">
[<?php echo CHtml::link('添加产品',array('create')); ?>]
<!-- [<?php echo CHtml::link('产品系列管理',array('product_series/admin')); ?>]-->
</div>

<table class="dataGrid" width="900">
  <thead>
  <tr>
    <th width="150"><?php echo $sort->link('name'); ?></th>
    <th width="150"><?php echo $sort->link('series_name'); ?></th>
    <th width="100"><?php echo $sort->link('type'); ?></th>
    <th width="100"><?php echo $sort->link('standards'); ?></th>
    <th width="80"><?php echo $sort->link('material'); ?></th>
    <th width="120"><?php echo $sort->link('create_time'); ?></th>
    <th width="120"><?php echo $sort->link('update_time'); ?></th>
	<th width="80">操作</th>
  </tr>
  </thead>
  <tbody>
<?php foreach($models as $n=>$model): ?>
  <tr class="<?php echo $n%2?'even':'odd';?>">
  	<?php $url=array('show','id'=>$model->id)+$_GET;?>
    <td><?php echo CHtml::link($model->name,$url); ?></td>
    <td><?php echo CHtml::encode($model->series_name); ?></td>
    <td><?php echo CHtml::encode($model->type); ?></td>
    <td><?php echo CHtml::encode($model->standards); ?></td>
    <td><?php echo CHtml::encode($model->material); ?></td>
    <td><?php echo CHtml::encode($model->create_time); ?></td>
    <td><?php echo CHtml::encode($model->update_time); ?></td>
    <td>
     <?php echo CHtml::link('修改',array('update','id'=>$model->id)+$_GET); ?>
     <?php echo CHtml::link('删除',array('delete','id'=>$model->id)+$_GET,array('confirm'=>"确定要删除 {$model->name} 的产品信息吗？")); ?>
    </td>
  </tr>
<?php endforeach; ?>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages,'htmlOptions'=>array('style'=>'width:900px;'))); ?>